<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'detail';
if($_RQ['op']=='detail'){
	$id=intval($_RQ['id']);
	if(!$id){
		exi('请先选择公告！','error','goback');
	}
	$item=pdo_get('jy_weishop_notice',array('id'=>$id,'status'=>1,'uniacid'=>$_SESSION['uniacid']));
	$item['createtime']=date('Y-m-d H:s:i',$item['createtime']);
	if(!$item){
		exi('指定公告不存在或已被删除！','error');
	}
	$return['item']=$item;
	$sharelink='jy_weishop/shop.noticedetail//fromuser='.$_SESSION['uid'].'&id='.$return['item']['id'];
	$return['sharedata']=array(
			'title'=>$return['item']['title'] . '-' . $_SESSION['account']['title'],
			'desc'=>$return['item']['desc']?:$return['item']['title'],
			'link'=>custom_url($sharelink,true),
			'imgUrl'=>tomedia($return['item']['pic_url'])
	);
	set_html('title',$return['item']['title']);
	set_html('keywords',$return['sharedata']['desc']);
	set_html('description',$return['sharedata']['desc']);
	exi($return);
}
?>